<template>
  <div class="wrapper">
    <nav-bar class="cart">
      <div slot="center">购物车({{cartLength}})</div>
    </nav-bar>
      <cart-list></cart-list>

      <cart-bottom-bar />
  </div>
</template>

<script>
import CartList from './childCart/CartList'
import CartBottomBar from './childCart/CartBottomBar'
// import Toast from "../../components/common/toast/toast"
import NavBar from '../../components/common/navbar/NavBar'
import Scroll from '../../components/common/scroll/Scroll'
import {mapGetters} from 'vuex'

export default {
  name: 'Cart',
  data() {
    return {
      messageList: '购买物品请扫描下方二维码',
      imgShowList: false,
      isshowList: false
    }
  },
  components: {
    NavBar,
    CartList,
    CartBottomBar,
    Scroll,
  },
  computed: {
    ...mapGetters({
      cartLength:'cartLength'
    })
  },
  methods: {
    barClick() {
      this.isshowList = true
      this.imgShowList = true
      setTimeout(() => {
        this.isshowList = false
        this.imgShowList = false
      }, 5000)
    }
  }

}
</script>

<style scoped>
.wrapper {
  height: 100vh;
}

.cart {
  color: lightskyblue;
  background-color: var(--color-high-text);
  font-weight: 500;
}

</style>
